package com.Excrises.Seven;


import java.util.ArrayList;
import java.util.Arrays;

public class Company implements ClassName{

    private String name = "Google";
    @Override
    public String getClassName() throws NoSuchFieldException {
        Class aClass = this.getClass();
        //查看该类所申明的字段
        System.out.println(aClass.getDeclaredFields()[0].getName());
        return aClass.getName();
    }

    public static void main(String[] args) throws NoSuchFieldException{
        Company company = new Company();
        System.out.println(company.getClassName());
    }
}
